# Maintainer: Miles Alan <m@milesalan.com>
pkgname=lf
pkgver=14
pkgrel=0
pkgdesc="Terminal filemanager written in Go with vim-style keybindings"
url="https://github.com/gokcehan/lf"
arch="all"
license="MIT"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/gokcehan/lf/archive/r$pkgver.tar.gz"
options="chmod-clean net"

export GOPATH="$srcdir"
export GOCACHE="$srcdir"
export GOTMPDIR="$srcdir"

prepare() {
	mkdir -p ${builddir%/*}
	mv $srcdir/$pkgname-r$pkgver "$builddir"/
	default_prepare
}

build() {
	go build -v -o bin/$pkgname
}

check() {
	go test ./...
}

package() {
	install -Dm755 "$builddir"/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
	install -Dm644 lf.1 "$pkgdir"/usr/share/man/man1/lf.1
}

sha512sums="cd2e268d551a0a83a32563424675455288e09b28d60940143eff4d24cf5b98ad0d7bd9ab100ea5a456e37460c318001ad5b444d252a986e9ddcfff274adf7720  lf-14.tar.gz"
